daily return
LLM-Enhanced Black-Litterman Portfolio Optimization
Lee, Youngbin, Kim, Yejin, Kim, Juhyeong, Kim, Suin, Lee, Yongjae
The Black-Litterman model addresses the sensitivity issues of tra- ditional mean-variance optimization by incorporating investor views, but systematically generating these views remains a key challenge. This study proposes and validates a systematic frame- work that translates return forecasts and predictive uncertainty from Large Language Models (LLMs) into the core inputs for the Black-Litterman model: investor views and their confidence lev- els. Through a backtest on S&P 500 constituents, we demonstrate that portfolios driven by top-performing LLMs significantly out- perform traditional baselines in both absolute and risk-adjusted terms. Crucially, our analysis reveals that each LLM exhibits a dis- tinct and consistent investment style which is the primary driver of performance. We found that the selection of an LLM is therefore not a search for a single best forecaster, but a strategic choice of an investment style whose success is contingent on its alignment with the prevailing market regime. The source code and data are available at https://github.com/youngandbin/LLM-BLM.
FinLlama: Financial Sentiment Classification for Algorithmic Trading Applications
Konstantinidis, Thanos, Iacovides, Giorgos, Xu, Mingxue, Constantinides, Tony G., Mandic, Danilo
There are multiple sources of financial news online which influence market movements and trader's decisions. This highlights the need for accurate sentiment analysis, in addition to having appropriate algorithmic trading techniques, to arrive at better informed trading decisions. Standard lexicon based sentiment approaches have demonstrated their power in aiding financial decisions. However, they are known to suffer from issues related to context sensitivity and word ordering. Large Language Models (LLMs) can also be used in this context, but they are not finance-specific and tend to require significant computational resources. To facilitate a finance specific LLM framework, we introduce a novel approach based on the Llama 2 7B foundational model, in order to benefit from its generative nature and comprehensive language manipulation. This is achieved by fine-tuning the Llama2 7B model on a small portion of supervised financial sentiment analysis data, so as to jointly handle the complexities of financial lexicon and context, and further equipping it with a neural network based decision mechanism. Such a generator-classifier scheme, referred to as FinLlama, is trained not only to classify the sentiment valence but also quantify its strength, thus offering traders a nuanced insight into financial news articles. Complementing this, the implementation of parameter-efficient fine-tuning through LoRA optimises trainable parameters, thus minimising computational and memory requirements, without sacrificing accuracy. Simulation results demonstrate the ability of the proposed FinLlama to provide a framework for enhanced portfolio management decisions and increased market returns. These results underpin the ability of FinLlama to construct high-return portfolios which exhibit enhanced resilience, even during volatile periods and unpredictable market events.
Analyzing Currency Fluctuations: A Comparative Study of GARCH, EWMA, and IV Models for GBP/USD and EUR/GBP Pairs
In this study, we examine the fluctuation in the value of the Great Britain Pound (GBP). We focus particularly on its relationship with the United States Dollar (USD) and the Euro (EUR) currency pairs. Utilizing data from June 15, 2018, to June 15, 2023, we apply various mathematical models to assess their effectiveness in predicting the 20-day variation in the pairs' daily returns. Our analysis involves the implementation of Exponentially Weighted Moving Average (EWMA), Generalized Autoregressive Conditional Heteroskedasticity (GARCH) models, and Implied Volatility (IV) models. To evaluate their performance, we compare the accuracy of their predictions using Root Mean Square Error (RMSE) and Mean Absolute Error (MAE) metrics. We delve into the intricacies of GARCH models, examining their statistical characteristics when applied to the provided dataset. Our findings suggest the existence of asymmetric returns in the EUR/GBP pair, while such evidence is inconclusive for the GBP/USD pair. Additionally, we observe that GARCH-type models better fit the data when assuming residuals follow a standard t-distribution rather than a standard normal distribution. Furthermore, we investigate the efficacy of different forecasting techniques within GARCH-type models. Comparing rolling window forecasts to expanding window forecasts, we find no definitive superiority in either approach across the tested scenarios. Our experiments reveal that for the GBP/USD pair, the most accurate volatility forecasts stem from the utilization of GARCH models employing a rolling window methodology. Conversely, for the EUR/GBP pair, optimal forecasts are derived from GARCH models and Ordinary Least Squares (OLS) models incorporating the annualized implied volatility of the exchange rate as an independent variable. Keywords: Euro, Exponentially Weighted Moving Average, Generalized Autoregressive Conditional Heteroskedasticity, Great Britain Pound, Implied Volatility, United States Dollar 1. Introduction As defined by the [1], a volatility of a financial asset is simply how much its price changes over time.
In the Red(dit): Social Media and Stock Prices
I spent most of the summer sifting through topics, including patents, blood diamonds and police brutality. None of them really stuck. However, on September 16, 2021 I sent Dr. White this email: " In a shocking turn of events, I have found another thing I would like to research. I would like to see if Twitter "coverage" of a publicly traded stock or related phrase ("google" and "search engine") can predict the daily returns of the stock, or changes in the highs/lows/volume of trades. The theory here being that investors' valuation of a stock may be reinforced or informed based on their perception of how others think about the companies (sort of like herd behavior) or their familiarity with the firm in general. If there is an effect, I would particularly like to examine whether this effect has gotten stronger during corona times, as many journalists are claiming that now that everyone is sitting at home with their commission-free trading apps like RobinHood, there are tons of amateur investors in the scene, who may be prone to "window shopping" for hot stocks that make the news.
EmTract: Extracting Emotions from Social Media
Vamossy, Domonkos F., Skog, Rolf
We develop an open-source tool (EmTract) that extracts emotions from social media text tailed for financial context. To do so, we annotate ten thousand short messages from a financial social media platform (StockTwits) and combine it with open-source emotion data. We then use a pre-tuned NLP model, DistilBERT, augment its embedding space by including 4,861 tokens (emojis and emoticons), and then fit it first on the open-source emotion data, then transfer it to our annotated financial social media data. Our model outperforms competing open-source state-of-the-art emotion classifiers, such as Emotion English DistilRoBERTa-base on both human and chatGPT annotated data. Compared to dictionary based methods, our methodology has three main advantages for research in finance. First, our model is tailored to financial social media text; second, it incorporates key aspects of social media data, such as non-standard phrases, emojis, and emoticons; and third, it operates by sequentially learning a latent representation that includes features such as word order, word usage, and local context. Using EmTract, we explore the relationship between investor emotions expressed on social media and asset prices. We show that firm-specific investor emotions are predictive of daily price movements. Our findings show that emotions and market dynamics are closely related, and we provide a tool to help study the role emotions play in financial markets.
Invested! Stock market prediction with Neural Networks
In this post, we attempt to find a way to systematically beat the market by applying a Bayesian Neural Network, an artificial neural network using Bayesian inference, and a Long Short Term Memory network (LSTM), a version of an artificial recurrent neural network. We apply these networks to predict the next-day prices or returns of the SPY ETF. These predictions determine if we should hold our shares or sell them. Through this process, we were able to construct an active strategy with a significantly higher Sharpe ratio than the Sharpe ratio of SPY over the same period. While we set out to achieve higher returns and less volatility than the market, we achieved similar returns but with far less volatility. The implications and process of outperforming the S&P 500 on a risk-adjusted basis will be discussed within the following analysis. Modern Portfolio Theory states that the best investment you can make is one into index funds unless you hold a consistent comparative advantage. These funds are essentially a proxy holding a portfolio of the whole market.
Capital Assets Pricing Model (CAPM) -- Using Python
The capital asset pricing model (CAPM) is very widely used and is considered to be a very fundamental concept in investing. It determines the link between the risk and expected return of assets, in particular stocks. According to CAPM, the value of ฮฑ is expected to be zero and that it is very random and cannot be predicted. The equation seen above is in the form of y mx b and therefore it can be treated as a form of linear regression. The scipy package will be used. It has a function to calculate the linear regression.
Portfolio Management using Python -- Portfolio Optimization
Portfolio optimization is the process of choosing the best portfolio among the set of all portfolios. The naive way is to select a group of random allocations and figure out which one has the best Sharpe Ratio. This is known as the Monte Carlo Simulation where randomly a weight is assigned to each security in the portfolio and then the mean daily return and standard deviation of daily return is calculated. This helps in calculating the Sharpe Ratio for randomly selected allocations. But the naive way is time taking so an optimization algorithm is used which works on the concept of the minimizer.
Machine learning based forecasting of significant daily returns in foreign exchange markets
Kamalov, Firuz, Gurrib, Ikhlaas
Asset value forecasting has always attracted an enormous amount of interest among researchers in quantitative analysis. The advent of modern machine learning models has introduced new tools to tackle this classical problem. In this paper, we apply machine learning algorithms to hitherto unexplored question of forecasting instances of significant fluctuations in currency exchange rates. We perform analysis of nine modern machine learning algorithms using data on four major currency pairs over a 10 year period. A key contribution is the novel use of outlier detection methods for this purpose. Numerical experiments show that outlier detection methods substantially outperform traditional machine learning and finance techniques. In addition, we show that a recently proposed new outlier detection method PKDE produces best overall results. Our findings hold across different currency pairs, significance levels, and time horizons indicating the robustness of the proposed method.
Forecasting significant stock price changes using neural networks
Stock price prediction is a rich research topic that has attracted interest from various areas of science. The recent success of machine learning in speech and image recognition has prompted researchers to apply these methods to asset price prediction. The majority of literature has been devoted to predicting either the actual asset price or the direction of price movement. In this paper, we study a hitherto little explored question of predicting significant changes in stock price based on previous changes using machine learning algorithms. We are particularly interested in the performance of neural network classifiers in the given context. To this end, we construct and test three neural network models including multi-layer perceptron, convolutional net, and long short term memory net. As benchmark models we use random forest and relative strength index methods. The models are tested using 10-year daily stock price data of four major US public companies. Test results show that predicting significant changes in stock price can be accomplished with a high degree of accuracy. In particular, we obtain substantially better results than similar studies that forecast the direction of price change.